#include <iostream>
using namespace std;
int fibonacci_recursively(int i){
    if (i <= 1){
        return i;
    }
    else{
        return fibonacci_recursively(i-1)+fibonacci_recursively(i-2);
    }
}
int do_fibonacci_recursively(int a){
    for(int j=1;true;j++){
        int n=fibonacci_recursively(j);
        int b = fibonacci_recursively(j+1);
        cout<<n;
        if (b >= a){
            cout<<"."<<endl;
            break;
        }
        else{
            cout<<",";
        }
    }
    return 0;
}
int main(){
    int p;
    cin>>p;
    do_fibonacci_recursively(p);
    return 0;
}
